#!usr/bin/env python  
#@time: 2018/01/19
try:
    f = open('./test.txt','r')
    content = f.read()
    print(content)
except FileNotFoundError as e:
    print('文件没有找到')
finally:
    if 'f' in dir():
        print('执行了')
        f.close()


with open('./test.txt','r') as f:
    for line in f.readlines():
        print(line.strip())





